package cn.imvc.app.models;

import java.util.List;
import java.util.Map;
import cn.imvc.app.entities.GoodsSku;

/**
 * 商品sku service 接口
 * 
 * @author lijibo
 *
 */
public interface GoodsSkuModel {

	/**
	 * 单品页
	 * 
	 * @param skuId
	 * @param platform 
	 * @return
	 */
	Map<String, Object> showDetail(Integer skuId, int platform);

	/**
	 * 获取商品正常状态的sku集合
	 * 
	 * @param goodsId
	 * @return
	 */
	List<GoodsSku> findByGoodsId(Integer goodsId);

	/**
	 * 更新sku相关统计数
	 * 
	 * @param goodsSkuId
	 * @param clickIncrease
	 * @param salenumIncrease
	 * @param collectIncrease
	 * @param evaluationCountIncrease
	 * @return
	 */
	void retryMaintainCountsOfGoodsSku(Integer goodsSkuId, Integer clickIncrease, Integer salenumIncrease, Integer collectIncrease,
			Integer evaluationCountIncrease);

	/**
	 * 返回总库存 并 更新点击数
	 * 
	 * @param goodsId
	 * @param skuId
	 * @return
	 */
	Integer saveIncreaseClickAndGetInventory(Integer goodsId, Integer skuId);
	
	List<Object[]> findMaxId();
}
